package com.ivo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ivo.dao.HibernateCaller;
import com.ivo.model.TemplateAttribute;

@Component
public class FormService
{
	@Autowired
	HibernateCaller hibernateCaller;

	public List<TemplateAttribute> getTmplAttrs(Long tmpl_Id)
	{
		String hql = "from TemplateAttribute a where a.template.templateId = ? and a.isValid = 1 order by a.sortOrder";
		List list = hibernateCaller.get( hql, tmpl_Id );
		return list;
	}

}
